package com.etrans.baf.analyse.task.alarm.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.etrans.baf.analyse.task.alarm.service.DataQualityService;

@Component("dataQualityAnalyse")
@Controller
@RequestMapping("/task/alarm/dataQualityAnalyse/*")
public class DataQualityAnalyse {
	
	static final Logger logger = LoggerFactory.getLogger(DataQualityAnalyse.class);
	
	@Autowired
	private DataQualityService dataQualityService;
	/**
	 * 轨迹质量分析
	 */
	@RequestMapping(value = "trackDataAnalyse.html")
	public void trackDataAnalyse(){
		logger.info("数据质量分析开始----------------");
		try {
			dataQualityService.trackDataAnalyse();
		} catch (Exception e) {
			e.printStackTrace();
		}
		logger.info("数据质量分析结束----------------");
		 
	}
	/**
	 * 报警质量分析
	 */
	@RequestMapping(value = "alarmDataAnalyse.html")
	public void alarmDataAnalyse(){
		logger.info("报警质量分析开始----------------");
		try {
			dataQualityService.alarmDataAnalyse(); 
		} catch (Exception e) {
			e.printStackTrace();
		}
		logger.info("报警质量分析结束----------------");
		 
	}
	/**
	 * 拍照质量分析
	 */
	@RequestMapping(value = "imageDataAnalyse.html")
	public void imageDataAnalyse(){
		logger.info("拍照质量分析开始----------------");
		try {
			dataQualityService.imageDataAnalyse(); 
		} catch (Exception e) {
			e.printStackTrace();
		}
		logger.info("拍照质量分析结束----------------");
		 
	}

}
